package com.ruoyi.initialdata.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 原始数据信息对象 initial_data_table_1
 * 
 * @author zry
 * @date 2023-05-11
 */
public class InitialDataTable1 extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 数据id */
    @Excel(name = "数据id")
    private Long dataId;

    /** 该条数据属于的指标名字 */
    @Excel(name = "指标名字")
    private String dataIndexName;

    /** 数据类型（数字/字符串) */
    @Excel(name = "数据类型")
    private String dataType;

    /** 如果数据类型是数字，则值为数据的值，否则值为NULL */
    @Excel(name = "数值",cellType = Excel.ColumnType.FLOAT)
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private Float dataNumber;

    /** 如果数据类型是字符串，则值为数据的值，否则值为NULL */
    @Excel(name = "文本值")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private String dataString;

    /** 数据记录时间 */
    @Excel(name = "数据记录时间")
    private String dataTime;

    /** 数据具体内容 */
    @Excel(name = "数据具体内容")
    private String dataContent;

    public void setDataId(Long dataId) 
    {
        this.dataId = dataId;
    }

    public Long getDataId() 
    {
        return dataId;
    }
    public void setDataIndexName(String dataIndexName) 
    {
        this.dataIndexName = dataIndexName;
    }

    public String getDataIndexName() 
    {
        return dataIndexName;
    }
    public void setDataType(String dataType) 
    {
        this.dataType = dataType;
    }

    public String getDataType() 
    {
        return dataType;
    }
    public void setDataNumber(String dataNumber)
    {
        //System.out.println(dataNumber);
        if (dataNumber==null){
            this.dataNumber= null;
        }
        else {
            this.dataNumber = Float.parseFloat(dataNumber);
        }
    }

    public Float getDataNumber()
    {
        return dataNumber;
    }
    public void setDataString(String dataString) 
    {
        this.dataString = dataString;
    }

    public String getDataString() 
    {
        return dataString;
    }
    public void setDataTime(String dataTime) 
    {
        this.dataTime = dataTime;
    }

    public String getDataTime() 
    {
        return dataTime;
    }
    public void setDataContent(String dataContent) 
    {
        this.dataContent = dataContent;
    }

    public String getDataContent() 
    {
        return dataContent;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dataId", getDataId())
            .append("dataIndexName", getDataIndexName())
            .append("dataType", getDataType())
            .append("dataNumber", getDataNumber())
            .append("dataString", getDataString())
            .append("dataTime", getDataTime())
            .append("dataContent", getDataContent())
            .toString();
    }
}
